﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Symbonix.NorSoNet.Framework;
using Symbonix.NorSoNet.Security.BLL.Membership;

public partial class Login : PublicBasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            login.DestinationPageUrl = Symbonix.NorSoNet.Framework.CustomSiteMap.GetUrl(Symbonix.NorSoNet.Framework.CustomSiteMap.Name.Login.ToString());
            ((MasterPages_Public)this.Master).ShowLoginInLink(CustomSiteMap.GetUrl(CustomSiteMap.Name.Registration.ToString()),"Registration");
        }
    }

    protected void AfterLoggedIn(object sender, EventArgs e)
    {
        login.DestinationPageUrl = Symbonix.NorSoNet.Security.BLL.ModuleManager.SecuriyWorkflow.DeterimeLoginDestinationPage(login.UserName);
        Response.Redirect(login.DestinationPageUrl);
    }
}
